package com.android.demos.data.remote.http.result.base;

import com.android.demos.data.remote.http.RequestCode;
import com.google.gson.annotations.SerializedName;
import com.soybean.framework.http.code.result.Result;

/**
 * Created on 16/11/29.
 *
 * @author aaron.huang
 * @version 1.0.0
 */

public class BaseResult implements Result {
    @SerializedName("err_code")
    private int mCode;

    @SerializedName("err_msg")
    private String message;

    /**
     *
     * @return 请求状态码
     */
    public int getCode() {
        return mCode;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public boolean isSuccess() {
        return mCode == RequestCode.SUCCESS;
    }
}
